package com.rp.system.po;

import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.hibernate.annotations.Type;
import org.raptor.entity.BaseModel3;

@Entity
@Table(name="RP_SYSTEM_MESSAGES")
public class RpMessage extends BaseModel3 {

	private static final long serialVersionUID = -7089504803821817069L;
	
	private String title;
	private String content;
	
	private String creatorId;
	private String creatorName;
	
	private String receiver;
	
	//private List<User> receiver;
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	@Lob
	@Type(type="org.springframework.orm.hibernate3.support.ClobStringType")
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getCreatorId() {
		return creatorId;
	}
	public void setCreatorId(String creatorId) {
		this.creatorId = creatorId;
	}
	public String getCreatorName() {
		return creatorName;
	}
	public void setCreatorName(String creatorName) {
		this.creatorName = creatorName;
	}
	public String getReceiver() {
		return receiver;
	}
	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}
	
	/*@ManyToMany(
			fetch = FetchType.LAZY, 
			cascade = {CascadeType.MERGE,CascadeType.PERSIST,CascadeType.REFRESH})
	@JoinTable(
			name = "RP_SYSTEM_USER_MESSAGES", 
			joinColumns = { @JoinColumn(name = "message_id") }, 
			inverseJoinColumns = { @JoinColumn(name = "user_id") })
	public List<User> getReceiver() {
		return receiver;
	}
	public void setReceiver(List<User> receiver) {
		this.receiver = receiver;
	}*/
	
	
	
}
